package com.demo.apparel.service.uniapp.Impl;

import com.demo.apparel.entity.Agreement;
import com.demo.apparel.mapper.uniapp.WxAgreementMapper;
import com.demo.apparel.service.uniapp.WxAgreementService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxWxAgreementServiceImpl implements WxAgreementService {

    private final WxAgreementMapper wxAgreementMapper;

    public WxWxAgreementServiceImpl(WxAgreementMapper wxAgreementMapper) {
        this.wxAgreementMapper = wxAgreementMapper;
    }


    @Override
    public Agreement getActiveAgreement() {
        return wxAgreementMapper.getActiveAgreement();
    }

    @Override
    public List<Agreement> getAllAgreements() {
        return wxAgreementMapper.getAllAgreements();
    }

    @Override
    public void setActive(String id, boolean active) {
        wxAgreementMapper.setActive(id, active);
    }
}